package com.xyy.saas.payment.api.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.xyy.saas.payment.dao.model.BankCardBindQueryParam;
import com.xyy.saas.payment.manage.cores.api.JDCardPayApi;
import com.xyy.saas.payment.manage.cores.dto.BankCardBindDto;
import com.xyy.saas.payment.manage.cores.dto.BankCardBindLogDto;
import com.xyy.saas.payment.manage.cores.vo.BankCardBindLogVo;
import com.xyy.saas.payment.manage.cores.vo.BankCardBindVo;
import com.xyy.saas.payment.manage.cores.vo.ResultPageVo;
import com.xyy.saas.payment.manage.cores.vo.ResultVO;
import com.xyy.saas.payment.service.JDPayService;
import com.xyy.saas.payment.util.PojoConvertUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0.0")
@Slf4j
public class JDCardPayApiImpl implements JDCardPayApi {
    @Autowired
    private JDPayService jdPayService;

    /**
     * 查询绑卡列表
     */
    @Override
    public ResultPageVo<List<BankCardBindDto>> queryCardPage(BankCardBindVo param) {
        return jdPayService.queryCardPage(PojoConvertUtil.convertPojo(param, BankCardBindQueryParam::new));
    }

    /**
     * 查询绑卡日志记录
     */
    @Override
    public ResultVO<List<BankCardBindLogDto>> queryCardLog(BankCardBindLogVo param) throws IllegalAccessException {
        return jdPayService.queryCardLog(param);
    }

}
